home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Interfaces / MPW Interfaces / PInterfaces / MediaHandlers.p < prev    next >
Encoding:
Text File  |  1993-09-17  |  6.5 KB  |  165 lines  |  [TEXT/MPS ]

  1. {************************************************************
  2.     Created: Wednesday, April 21, 1993
  3.     MediaHandlers.p
  4.     Pascal Interface to the Macintosh Libraries
  5.     
  6.     Copyright Apple Computer, Inc. 1990-93
  7.     All rights reserved
  8. ************************************************************}
  9.  
  10. {$IFC UNDEFINED UsingIncludes}
  11. {$SETC UsingIncludes := 0}
  12. {$ENDC}
  13.  
  14. {$IFC NOT UsingIncludes}
  15.  UNIT MediaHandlers;
  16.  INTERFACE
  17. {$ENDC}
  18.  
  19. {$IFC UNDEFINED UsingMediaHandlers}
  20. {$SETC UsingMediaHandlers := 1}
  21.  
  22. {$I+}
  23. {$SETC MediaHandlersIncludes := UsingIncludes}
  24. {$SETC UsingIncludes := 1}
  25. {$IFC UNDEFINED UsingMovies}
  26. {$I $$Shell(PInterfaces)Movies.p}
  27. {$ENDC}
  28.  
  29. {$SETC UsingIncludes := MediaHandlersIncludes}
  30.  
  31. CONST
  32. handlerHasSpatial         = $1;
  33. handlerCanClip             = $2;
  34. handlerCanMatte         = $4;
  35. handlerCanTransferMode     = $8;
  36. handlerNeedsBuffer         = $10;
  37. handlerNoIdle             = $20;
  38. handlerNoScheduler         = $40;
  39. handlerWantsTime         = $80;
  40. handlerCGrafPortOnly     = $100;
  41.  
  42. mMustDraw         = $8;
  43. mAtEnd             = $10;
  44. mPreflightDraw     = $20;
  45.  
  46. mDidDraw         = $1;
  47. mNeedsToDraw     = $4;
  48.  
  49. kMediaInitializeSelect                 = $501;
  50. kMediaSetHandlerCapabilitiesSelect     = $502;
  51. kMediaIdleSelect                     = $503;
  52. kMediaGetMediaInfoSelect             = $504;
  53. kMediaPutMediaInfoSelect             = $505;
  54. kMediaSetActiveSelect                 = $506;
  55. kMediaSetRateSelect                 = $507;
  56. kMediaGGetStatusSelect                 = $508;
  57. kMediaTrackEditedSelect             = $509;
  58. kMediaSetMediaTimeScaleSelect        = $50A;
  59. kMediaSetMovieTimeScaleSelect         = $50B;
  60. kMediaSetGWorldSelect                 = $50C;
  61. kMediaSetDimensionsSelect             = $50D;
  62. kMediaSetClipSelect                 = $50E;
  63. kMediaSetMatrixSelect                 = $50F;
  64. kMediaGetTrackOpaqueSelect             = $510;
  65. kMediaSetGraphicsModeSelect         = $511;
  66. kMediaGetGraphicsModeSelect         = $512;
  67. kMediaGSetVolumeSelect                 = $513;
  68. kMediaSetSoundBalanceSelect         = $514;
  69. kMediaGetSoundBalanceSelect         = $515;
  70. kMediaGetNextBoundsChangeSelect     = $516;
  71. kMediaGetSrcRgnSelect                 = $517;
  72. kMediaPrerollSelect                 = $518;
  73. kMediaSampleDescriptionChanged         = $519;
  74. kMediaHasCharacteristic             = $51A;
  75. kMediaGetOffscreenBufferSize         = $51B;
  76. kMediaSetHints                         = $51C;
  77. kMediaGetNameSelect                 = $51D;
  78.  
  79. TYPE
  80. GetMovieCompleteParams =     RECORD
  81.                             version             : INTEGER;
  82.                             theMovie            : Movie;
  83.                             theTrack            : Track;
  84.                             theMedia            : Media;
  85.                             movieScale            : TimeScale;
  86.                             mediaScale            : TimeScale;
  87.                             movieDuration        : TimeValue;
  88.                             trackDuration        : TimeValue;
  89.                             mediaDuration        : TimeValue;
  90.                             effectiveRate        : Fixed;
  91.                             timeBase            : TimeBase;
  92.                             volume                : INTEGER;
  93.                             width                : Fixed;
  94.                             height                : Fixed;
  95.                             trackMovieMatrix    : MatrixRecord;
  96.                             moviePort            : CGrafPtr;
  97.                             movieGD                : GDHandle;
  98.                             trackMatte            : PixMapHandle;
  99.                             END;
  100.  
  101. FUNCTION MediaInitialize (ci:ComponentInstance; VAR gmc : GetMovieCompleteParams):ComponentResult; 
  102.  INLINE $2F3C,$4,$501,$7000,$A82A;
  103. FUNCTION MediaSetHandlerCapabilities (ci:ComponentInstance; flags:LONGINT; flagsMask:LONGINT ):ComponentResult; 
  104.  INLINE $2F3C,$8,$502,$7000,$A82A;
  105. FUNCTION MediaIdle (ci:ComponentInstance; atMediaTime:TimeValue; flagsIn:LONGINT ; VAR flagsOut:LONGINT; VAR movieTime:TimeRecord):ComponentResult; 
  106.  INLINE $2F3C,$10,$503,$7000,$A82A;
  107. FUNCTION MediaGetMediaInfo (ci:ComponentInstance; h:Handle):ComponentResult; 
  108.  INLINE $2F3C,$4,$504,$7000,$A82A;
  109. FUNCTION MediaPutMediaInfo (ci:ComponentInstance; h:Handle):ComponentResult; 
  110.  INLINE $2F3C,$4,$505,$7000,$A82A;
  111. FUNCTION MediaSetActive (ci:ComponentInstance ; enableMedia:BOOLEAN  ):ComponentResult; 
  112.  INLINE $2F3C,$2,$506,$7000,$A82A;
  113. FUNCTION MediaSetRate (ci:ComponentInstance; rate:Fixed  ):ComponentResult; 
  114.  INLINE $2F3C,$4,$507,$7000,$A82A;
  115. FUNCTION MediaGGetStatus (ci:ComponentInstance; VAR statusErr:ComponentResult ):ComponentResult; 
  116.  INLINE $2F3C,$4,$508,$7000,$A82A;
  117. FUNCTION MediaTrackEdited (ci:ComponentInstance):ComponentResult; 
  118.  INLINE $2F3C,$0,$509,$7000,$A82A;
  119. FUNCTION MediaSetMediaTimeScale (ci:ComponentInstance; newTimeScale:TimeScale  ):ComponentResult; 
  120.  INLINE $2F3C,$4,$50A,$7000,$A82A;
  121. FUNCTION MediaSetMovieTimeScale (ci:ComponentInstance ; newTimeScale:TimeScale  ):ComponentResult; 
  122.  INLINE $2F3C,$4,$50B,$7000,$A82A;
  123. FUNCTION MediaSetGWorld (ci:ComponentInstance; aPort:CGrafPtr; aGD:GDHandle ):ComponentResult;
  124.  INLINE $2F3C,$8,$50C,$7000,$A82A;
  125. FUNCTION MediaSetDimensions ( ci:ComponentInstance; width:Fixed; height:Fixed ) :ComponentResult;
  126.  INLINE $2F3C,$8,$50D,$7000,$A82A;
  127. FUNCTION MediaSetClip (ci:ComponentInstance;theClip:RgnHandle ):ComponentResult; 
  128.  INLINE $2F3C,$4,$50E,$7000,$A82A;
  129. FUNCTION MediaSetMatrix (ci:ComponentInstance; VAR trackMovieMatrix :MatrixRecord ) :ComponentResult;
  130.  INLINE $2F3C,$4,$50F,$7000,$A82A;
  131. FUNCTION MediaGetTrackOpaque (ci:ComponentInstance;VAR trackIsOpaque:BOOLEAN ):ComponentResult; 
  132.  INLINE $2F3C,$4,$510,$7000,$A82A;
  133. FUNCTION MediaSetGraphicsMode (ci:ComponentInstance ; mode:LONGINT ; VAR opColor:RGBColor ):ComponentResult; 
  134.  INLINE $2F3C,$8,$511,$7000,$A82A;
  135. FUNCTION MediaGetGraphicsMode (ci:ComponentInstance; VAR mode:LONGINT; VAR opColor:RGBColor ):ComponentResult; 
  136.  INLINE $2F3C,$8,$512,$7000,$A82A;
  137. FUNCTION MediaGSetVolume (ci:ComponentInstance;volume:INTEGER  ):ComponentResult; 
  138.  INLINE $2F3C,$2,$513,$7000,$A82A;
  139. FUNCTION MediaSetSoundBalance (ci:ComponentInstance; balance:INTEGER):ComponentResult; 
  140.  INLINE $2F3C,$2,$514,$7000,$A82A;
  141. FUNCTION MediaGetSoundBalance (ci:ComponentInstance; VAR balance:INTEGER ):ComponentResult; 
  142.  INLINE $2F3C,$4,$515,$7000,$A82A;
  143. FUNCTION MediaGetNextBoundsChange (ci:ComponentInstance; VAR when:TimeValue ):ComponentResult; 
  144.  INLINE $2F3C,$4,$516,$7000,$A82A;
  145. FUNCTION MediaGetSrcRgn (ci:ComponentInstance; rgn:RgnHandle; atMediaTime:TimeValue  ):ComponentResult; 
  146.  INLINE $2F3C,$8,$517,$7000,$A82A;
  147. FUNCTION MediaPreroll (ci:ComponentInstance;time: TimeValue;rate: Fixed  ):ComponentResult; 
  148.  INLINE $2F3C,$8,$518,$7000,$A82A;
  149. FUNCTION MediaSampleDescriptionChanged (ci:ComponentInstance; index:LONGINT ):ComponentResult;
  150.  INLINE $2F3C,$4,$519,$7000,$A82A;
  151. FUNCTION MediaHasCharacteristic (ci:ComponentInstance; characteristic:OSType; VAR hasIt:BOOLEAN ):ComponentResult;
  152.  INLINE $2F3C,$8,$51A,$7000,$A82A;
  153. FUNCTION MediaGetOffscreenBufferSize (ci : ComponentInstance; VAR bounds:RECT ;  depth:INTEGER; ctab:CTabHandle ):ComponentResult;
  154.  INLINE $2F3C,$A,$51B,$7000,$A82A;
  155. FUNCTION MediaSetHints (ci : ComponentInstance;  hints:LONGINT ):ComponentResult;
  156.  INLINE $2F3C,$4,$51C,$7000,$A82A;
  157. FUNCTION MediaGetName (ci:ComponentInstance ; name:Str255; requestedLanguage:LONGINT ; VAR actualLanguage:LONGINT ):ComponentResult;
  158.  INLINE $2F3C,$C,$51D,$7000,$A82A;
  159.  
  160. {$ENDC} { UsingMediaHandlers }
  161.  
  162. {$IFC NOT UsingIncludes}
  163.  END.
  164. {$ENDC}
  165.